package com.android.lovingpet.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class Post implements Parcelable {

    private int albumCount;
    private int commentCount;
    private String context;
    private String createTime;
    private int deleted;
    private int id;
    private int realId;
    private int targetId;
    private int type;
    private int userId;
    private int userType = 1;
    private List<String> images = new ArrayList<>();

    public int getAlbumCount() {
        return albumCount;
    }

    public void setAlbumCount(int albumCount) {
        this.albumCount = albumCount;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getRealId() {
        return realId;
    }

    public void setRealId(int realId) {
        this.realId = realId;
    }

    public int getTargetId() {
        return targetId;
    }

    public void setTargetId(int targetId) {
        this.targetId = targetId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.albumCount);
        dest.writeInt(this.commentCount);
        dest.writeString(this.context);
        dest.writeString(this.createTime);
        dest.writeInt(this.deleted);
        dest.writeInt(this.id);
        dest.writeInt(this.realId);
        dest.writeInt(this.targetId);
        dest.writeInt(this.type);
        dest.writeInt(this.userId);
        dest.writeInt(this.userType);
        dest.writeStringList(this.images);
    }

    public Post() {
    }

    protected Post(Parcel in) {
        this.albumCount = in.readInt();
        this.commentCount = in.readInt();
        this.context = in.readString();
        this.createTime = in.readString();
        this.deleted = in.readInt();
        this.id = in.readInt();
        this.realId = in.readInt();
        this.targetId = in.readInt();
        this.type = in.readInt();
        this.userId = in.readInt();
        this.userType = in.readInt();
        this.images = in.createStringArrayList();
    }

    public static final Creator<Post> CREATOR = new Creator<Post>() {
        @Override
        public Post createFromParcel(Parcel source) {
            return new Post(source);
        }

        @Override
        public Post[] newArray(int size) {
            return new Post[size];
        }
    };
}
